/**
 * @Author       : cxh
 * @Date         : 2021-12-28 13:10:01
 * @LastEditTime : 2021-12-30 09:45:01
 * @LastEditors  : cxh
 * @Description  : 配置接口路由及返回路径
 * @FilePath     : \vue_WorkSpace\egg-wpt-server\app\router.js
 */
'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const {
    router,
    controller,
  } = app;
  router.get('/', controller.home.index);
  // user的增删查改接口
  router.post('/user/getUserList', controller.user.getUserList);
  // user的增加接口
  router.post('/user/createUser', controller.user.createUser);
  // 获取公钥的接口
  router.post('/getPublicKey', controller.pub.getPublicKey);
  // 注册
  router.post('/user/registerAdmin', controller.user.registerAdmin);
};
